package lee.study.String;

import java.util.Scanner;

public class TestTwo1028 {

    public static String stringReverse(String string, int first, int last) {
        char[] array=string.toCharArray();
        while (first<last){
            char tmp=array[last];
            array[last]=array[first];
            array[first]=tmp;
            first++;
            last--;
        }
        return new String(array);
    }

    public static void main(String[] args) {//将字符串的前n位后移到字符串尾部。
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        String str = scan.next();
        String ret=stringReverse(str,0,n-1);
        String ret1=stringReverse(ret,n,ret.length()-1);
        String ret2=stringReverse(ret1,0,ret.length()-1);
        System.out.println(ret2);
    }
}
